{{%CONTENT_TYPE:TEXT}}
// swift-tools-version:6.0
//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

import PackageDescription

let swiftSettings: [SwiftSetting] = [
    .enableExperimentalFeature("StrictConcurrency=complete")
]

let package = Package(
    name: "soto",
    platforms: [
        .macOS(.v10_15),
        .iOS(.v13),
        .tvOS(.v13),
        .watchOS(.v6),
    ],
    products: [
{{#targets}}
        .library(name: "Soto{{name}}", targets: ["Soto{{name}}"]),
{{/targets}}
    ],
    dependencies: [
        .package(url: "https://github.com/soto-project/soto-core.git", from: "7.9.0")
    ],
    targets: [
{{#targets}}
{{#hasExtension}}
        .target(
            name: "_Soto{{name}}Generated",
            dependencies: [{{#dependencies}}{{.}}{{^last()}}, {{/last()}}{{/dependencies}}],
            path: "./Sources/Soto/Services/{{name}}",
            swiftSettings: swiftSettings
        ),
{{/hasExtension}}
{{^hasExtension}}
        .target(
            name: "Soto{{name}}",
            dependencies: [{{#dependencies}}{{.}}{{^last()}}, {{/last()}}{{/dependencies}}],
            path: "./Sources/Soto/Services/{{name}}",
            swiftSettings: swiftSettings
        ),
{{/hasExtension}}
{{/targets}}
        // Service extensions
{{#extensionTargets}}
        .target(
            name: "Soto{{name}}",
            dependencies: [{{#dependencies}}{{.}}, {{/dependencies}}"_Soto{{name}}Generated"],
            path: "./Sources/Soto/Extensions/{{name}}",
            swiftSettings: swiftSettings
        ),
{{/extensionTargets}}

        .testTarget(
            name: "SotoTests",
            dependencies: [
{{#testTargets}}
                "Soto{{.}}",
{{/testTargets}}
            ]
        ),
    ]
)
